package com.wuseguang.springcloud.service.impl;

import com.wuseguang.springcloud.service.AdminManagementService;
import com.wuseguang.springcloud.util.CodeUtil;
import com.wuseguang.springcloud.util.Result;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

@Component
public class AdminManagementServiceFallbackFactory implements FallbackFactory<AdminManagementService> {
    @Override
    public AdminManagementService create(Throwable throwable) {
        return new AdminManagementService() {

            @Override
            public Result queryPersonDataByRole() {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result addPersonData(Integer id, String head_portrait, String admin_name, String phone, String password) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result queryPersonDataById(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result addAgentData(Integer id, String head_portrait, String corporate_name, String address, String phone, String password) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result delPersonData(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result queryDistrict(Integer id, Integer type) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySchoolAll(String name, Integer id, Integer type, Integer indexNo, Integer rows) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result updateSchoolDate(Integer sid, String sname, String logo, Integer districtId, Integer tid, String tname, String phone, String password, String endtime, Integer sbnumber) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result addSchoolDate(String sname, String logo, Integer districtId, String tname, String phone, String password, String endtime, Integer sbnumber) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySchoolDateById(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySchoolManagementJurisdiction(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result addSchoolManagementJurisdiction(String menuOne, String menuTwo, Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result addSchoolSemester(String name, Integer schoolId, String oneTerm, String oneTime, String twoTerm, String twoTime) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result updateSchoolSemester(Integer id, String name, Integer schoolId, String oneTerm, String oneTime, String twoTerm, String twoTime) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result updateSemesterState(Integer id, Integer schoolId) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySemesterById(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySemesterBySchoolId(Integer schoolId) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySemesterSchoolList(String name, Integer indexNo, Integer rows) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result updateSchoolUpgrade(Integer schoolId, Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result querySemesterYearId(Integer schoolId) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result upload(MultipartFile file, int type) {
                return new Result(CodeUtil.SERVER_BUSY);
            }

            @Override
            public Result delSchoolDateById(Integer id) {
                return new Result(CodeUtil.SERVER_BUSY);
            }
        };
    }
}
